package com.googlecode.gwt4gae.client.menu;

import com.extjs.gxt.ui.client.data.BaseTreeModel;

public class MenuModel extends BaseTreeModel {
	private static final long serialVersionUID = 7370647777493387267L;

	private Long id;
	private String name;
	private String code;
	private String url;

	public Long getId() {
		return get("id");
	}

	public MenuModel(Long id, String name, String code, String url) {
		super();
		this.id = id;
		this.name = name;
		this.code = code;
		this.url = url;

		set("id", this.id);
		set("name", this.name);
		set("code", this.code);
		set("url", this.url);
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return get("name");
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCode() {
		return get("code");
	}

	public void setCode(String code) {
		this.code = code;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getUrl() {
		return url;
	}

	public String toString() {
		return getName();
	}
}
